import json
import re
import csv


def get_str_by_re(left='\\A', right='\\Z', string=''):
    result = re.search(f'{left}(.*?){right}', string)
    return result.group(1)

def get_csv_data(path):
    count=csv.reader(open(path,encoding='utf-8'))
    list_data=[]
    for i in count:
        list_data.append(i)
    return list_data


def get_json_data():
    f = open(r"C:\Users\Administrator\PycharmProjects\seafile_129\data\sing_song_data3.json")
    text = f.read()  # json格式：字符串
    # print(text)
    # print(type(text))
    data = json.loads(text)  # 转化为python中列表数据结构
    # print(data)
    # print(type(data))
    return data